Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing problems with pasting from clipboard after tabs reorder #512

Merged
merged 1 commit into from
May 2, 2015

Conversation

Seraff
Copy link
Contributor

@Seraff Seraff commented May 1, 2015

Open Guake with 2 tabs. Paste some text in theese terminals, everything is ok.
Swap them. Now when you try to paste text in the first tab, it will be pasted in the second tab.

This is because we don't change order of GuakeNotebook's term_list when the order of GuakeNotebook's pages changes. When we paste something, accel_paste_clipboard() method calls (guake_app.py), it detects terminal in GuakeNotebook by the index of the current page.

I redefined reorder_child() method of GuakeNotebook. So when you reorder pages in GuakeNotebook, terminals will reorder automatically.

@pypingou
Copy link
Member

pypingou commented May 2, 2015

Cool, 👍 for me

@Seraff Seraff mentioned this pull request May 2, 2015
@Seraff
Copy link
Contributor Author

Seraff commented May 2, 2015

Also fixes #473.

@gsemet
Copy link
Member

gsemet commented May 2, 2015

good catch. All this code is buggy, tab management is buggy, this prevents to easily do something like split terminal or save session... If I had time I would rewrite all of this.

Thanks for the PL and time you spend on debuging this issue!

gsemet added a commit that referenced this pull request May 2, 2015
Fixing problems with pasting from clipboard after tabs reorder
@gsemet gsemet merged commit 86474e9 into Guake:master May 2, 2015
@gsemet gsemet added this to the 0.7.0 milestone May 2, 2015
@mertemba
Copy link
Contributor

This bug as well as #473 are still present when not swapping tabs next to each other.
Steps to reproduce (same on 0.7.2 and current master):

  • create 3 tabs (a, b, c)
  • move tab c to the left (c, a, b)
  • copy/paste in tabs a and b is interchanged
  • close tab b
  • now tab a is grey as described in Guake Turns Gray sometimes #473

This is because you do not only have to swap the terms by terms[old_pos], terms[position] = terms[position], terms[old_pos] but also move the terms in between.
I am not familar with the Guake code, but I can try to find a fix.

gsemet added a commit that referenced this pull request Jul 29, 2015
Swap terms correctly when moving tabs, fixes #473 and #512
gsemet added a commit that referenced this pull request Jan 30, 2017
Fixing problems with pasting from clipboard after tabs reorder
gsemet pushed a commit that referenced this pull request Jan 30, 2017
gsemet added a commit that referenced this pull request Jan 30, 2017
Swap terms correctly when moving tabs, fixes #473 and #512
gsemet added a commit that referenced this pull request Jan 30, 2017
Fixing problems with pasting from clipboard after tabs reorder
gsemet pushed a commit that referenced this pull request Jan 30, 2017
gsemet added a commit that referenced this pull request Jan 30, 2017
Swap terms correctly when moving tabs, fixes #473 and #512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants